<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>你个p</p>
    <span>这是span</span>
    <script src="js/jquery-3.2.1.js"></script>
    <script>
        // hover(移入，移出)
        $('p').hover(function(){
            $('span').css('background', 'blue')
        }, function(){
            $('span').css('background', 'red')
        })
    </script>
</body>
</html>